<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="http://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="root"></div>
</body>
<script>
    let app = Vue.createApp({
        setup() {
            const { watch, reactive, toRefs } = Vue
            const count2 = reactive({
                name: "abc"
            })
            watch(() => count2.name, (currentValue, prevValue) => {
                console.log(currentValue, prevValue)
            })
            const { name } = toRefs(count2)
            return {
                name
            }
        },
        template: `<div>
             <input v-model='name' />{{name}}
            </div>`,
    })
    app.mount('#root')
</script>

</html>